package com.tzbank.poc.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Create by li_zheng2 on 2019/1/21.
 */
public class ServiceUtil {

    public static Map<String, Object> returnFailure(String errorMessage) {
        return returnProblem("fail", errorMessage, (List)null, (Map)null, (Map)null);
    }

    private static Map<String,Object> returnProblem(String fail, String errorMessage, List list, Map map, Map map1) {
        return null;
    }



    public static Map<String, Object> returnSuccess() {
        return returnMessage("success", (String)null);
    }

    public static Map<String, Object> returnMessage(String code, String message) {
        Map<String, Object> result = new HashMap();
        if (code != null) {
            result.put("RetCode", code);
        }

        if (message != null) {
            result.put("RetMsg", message);
        }

        return result;
    }
}
